---
kind: ConfigMap
apiVersion: v1
metadata:
  name: indexer-config
data:
  config.yaml: |-
    redis_url: ${REDIS_URL}
    redis_password: ${REDIS_PASSWORD}
    koji_config: fedora
    odcs_uri: https://odcs{{ env_suffix }}.fedoraproject.org/
    deltas_dir: ${OUTPUT_DIR}/deltas/
    icons_dir: ${OUTPUT_DIR}/icons/
{% if env == 'staging' %}
    deltas_uri: https://registry{{ env_suffix }}.fedoraproject.org/deltas/
    icons_uri: https://registry{{ env_suffix }}.fedoraproject.org/app-icons/
{% else %}
    deltas_uri: https://cdn.registry.fedoraproject.org/deltas/
    icons_uri: https://cdn.registry.fedoraproject.org/app-icons/
{% endif %}
    clean_files_after: 1d
    daemon:
        update_interval: 30m
    registries:
        fedora:
            public_url: https://registry.fedoraproject.org/
            datasource: fedora
            force_flatpak_token: true
    indexes:
        latest:
            output: ${OUTPUT_DIR}/fedora/flatpak-latest.json
            registry: fedora
            tag: latest
            bodhi_status: stable
            extract_icons: True
            delta_keep: 30d
        latest-annotations:
            output: ${OUTPUT_DIR}/fedora/flatpak-latest-annotations.json
            registry: fedora
            tag: latest
            bodhi_status: stable
            extract_icons: True
            delta_keep: 30d
            flatpak_annotations: True
{% for architecture in [ 'amd64', 'arm64' ] %}
        latest-{{ architecture }}:
            output: ${OUTPUT_DIR}/fedora/flatpak-latest-{{ architecture }}.json
            registry: fedora
            architecture: {{ architecture }}
            tag: latest
            bodhi_status: stable
            extract_icons: True
            delta_keep: 30d
        latest-{{ architecture }}-annotations:
            output: ${OUTPUT_DIR}/fedora/flatpak-latest-{{ architecture }}-annotations.json
            registry: fedora
            architecture: {{ architecture }}
            tag: latest
            bodhi_status: stable
            extract_icons: True
            delta_keep: 30d
            flatpak_annotations: True
{% endfor %}
        testing:
            output: ${OUTPUT_DIR}/fedora/flatpak-testing.json
            registry: fedora
            tag: testing
            bodhi_status: testing
            extract_icons: True
        testing-annotations:
            output: ${OUTPUT_DIR}/fedora/flatpak-testing-annotations.json
            registry: fedora
            tag: testing
            bodhi_status: testing
            extract_icons: True
            flatpak_annotations: True
{% for architecture in [ 'amd64', 'arm64' ] %}
        testing-{{ architecture }}:
            output: ${OUTPUT_DIR}/fedora/flatpak-testing-{{ architecture }}.json
            registry: fedora
            architecture: {{ architecture }}
            tag: testing
            bodhi_status: testing
            extract_icons: True
        testing-{{ architecture }}-annotations:
            output: ${OUTPUT_DIR}/fedora/flatpak-testing-{{ architecture }}-annotations.json
            registry: fedora
            architecture: {{ architecture }}
            tag: testing
            bodhi_status: testing
            extract_icons: True
            flatpak_annotations: True
{% endfor %}
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: koji-conf
data:
  koji.conf: |-
    [fedora]
    server = https://koji.fedoraproject.org/kojihub
    weburl = https://koji.fedoraproject.org/koji
    topurl = https://kojipkgs.fedoraproject.org/
